export default [
  {
    type: 'input',
    name: 'name',
    label: '活动名称',
    required: true,
    rules: [
      { required: true, message: '请输入活动名称', trigger: 'blur' },
      { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
    ],
    options: {}
  },
  {
    type: 'select',
    name: 'region',
    label: '活动区域',
    required: true,
    rules: [{ required: true, message: '请选择活动区域', trigger: 'blur' }],
    dataSource: [
      //   { label: "请选择", value: "" },
      { label: '上海', value: 'shanghai' },
      { label: '北京', value: 'beijing' }
    ],
    options: {}
  },
  {
    type: 'cascader',
    name: 'cascader',
    label: '级联选择',
    required: true,
    defaultValue: ['zhinan', 'shejiyuanze', 'yizhi'],
    rules: [{ required: true, message: '请选择级联选择', trigger: 'blur' }],
    dataSource: [
      {
        value: 'zhinan',
        label: '指南',
        children: [
          {
            value: 'shejiyuanze',
            label: '设计原则',
            children: [
              {
                value: 'yizhi',
                label: '一致'
              },
              {
                value: 'fankui',
                label: '反馈'
              }
            ]
          },
          {
            value: 'daohang',
            label: '导航',
            children: [
              {
                value: 'cexiangdaohang',
                label: '侧向导航'
              },
              {
                value: 'dingbudaohang',
                label: '顶部导航'
              }
            ]
          }
        ]
      },
      {
        value: 'ziyuan',
        label: '资源',
        children: [
          {
            value: 'axure',
            label: 'Axure Components'
          },
          {
            value: 'sketch',
            label: 'Sketch Templates'
          },
          {
            value: 'jiaohu',
            label: '组件交互文档'
          }
        ]
      }
    ],
    options: {}
  },
  {
    type: 'date',
    name: 'date1',
    label: '活动日期',
    required: true,
    rules: [{ required: true, message: '请选择活动日期', trigger: 'change' }],
    options: {}
  },
  {
    type: 'time',
    name: 'date2',
    label: '活动时间',
    required: true,
    rules: [{ required: true, message: '请选择活动时间', trigger: 'change' }],
    options: {}
  },
  {
    type: 'datetime',
    name: 'date3',
    label: '日期时间',
    required: true,
    rules: [{ required: true, message: '请选择活动时间', trigger: 'change' }],
    options: {}
  },
  {
    type: 'number',
    name: 'days',
    label: '持续天数',
    required: true,
    rules: [{ required: true, message: '请输入活动时间', trigger: 'blur' }],
    options: {
      // precision: ,
      step: 0.1,
      max: 100
    }
  },
  {
    type: 'switch',
    name: 'delivery',
    label: '即时配送',
    required: true,
    defaultValue: true,
    rules: [{ required: true, message: '请选择活动区域', trigger: 'change' }],

    options: {}
  },
  {
    type: 'checkbox',
    name: 'type',
    label: '活动性质',
    required: true,
    defaultValue: ['1', '2'],
    rules: [{ required: true, message: '请选择活动性质', trigger: 'change' }],
    dataSource: [
      { label: '美食/餐厅线上活动', value: '1' },
      { label: '地推活动', value: '2' },
      { label: '线下主题活动', value: '3' },
      { label: '单纯品牌曝光', value: '4' }
    ]
  },
  {
    type: 'radio',
    name: 'resource',
    label: '特殊资源',
    required: true,
    rules: [{ required: true, message: '请选择活动性质', trigger: 'change' }],
    dataSource: [
      { label: '线上品牌商赞助', value: '1' },
      { label: '线下场地免费', value: '2' }
    ],
    options: {}
  },
  {
    type: 'textarea',
    name: 'desc',
    label: '活动形式',
    required: false,
    rules: [],
    hide: true,
    options: {}
  }
]
